
import { ESGeoVector, ESJEditingMode } from "earthsdk3";
import { CzmESVisualObject } from "./CzmESVisualObject";
import { ESCesiumViewer } from "../../ESCesiumViewer";
export class CzmESGeoVector<T extends ESGeoVector = ESGeoVector> extends CzmESVisualObject<T> {
    override updateEditing(): void {
        if (this.sceneObject.editing) {
            const editingModes: string[] = [];
            do {
                if (this.editingBindMode == 'doublePoints') {
                    editingModes.push(ESJEditingMode.DoublePointsAppend);
                    editingModes.push(ESJEditingMode.DoublePointsModify);
                    break;
                }
                if (this.editingBindMode == 'lineString') {
                    editingModes.push(ESJEditingMode.LineStringAppend);
                    editingModes.push(ESJEditingMode.LineStringInsert);
                    editingModes.push(ESJEditingMode.Translation);
                    break;
                }
                if (this.editingBindMode == 'circular') {
                    editingModes.push(ESJEditingMode.CircularAppend);
                    editingModes.push(ESJEditingMode.CircularInsert);
                    editingModes.push(ESJEditingMode.Translation);
                    if (this.sceneObject.supportEditingModes().includes(ESJEditingMode.HeightModify)) {
                        editingModes.push(ESJEditingMode.HeightModify);
                    }
                    break;
                }
                if (this.editingBindMode == 'visibility') {
                    editingModes.push(ESJEditingMode.VisibilityAppend);
                    editingModes.push(ESJEditingMode.VisibilityModify);
                    break;
                }
            } while (false);
            this.czmViewer.startEditing(this.sceneObject, editingModes);
        }
    }
    constructor(sceneObject: T, czmViewer: ESCesiumViewer) {
        super(sceneObject, czmViewer);
        const viewer = czmViewer.viewer;
        if (!viewer) {
            console.warn('viewer is undefined!');
            return;
        }
    }
}
